import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
// import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import * as Editor from './sdk/ckeditor';

@Component({
    selector: 'app-my-ck-editor',
    templateUrl: 'component.html',
    styleUrls: ['./style.component.scss']
})
export class MyCkEditorComponent implements  OnInit{
    @ViewChild("editor")
    editor: HTMLElement
    @Input()
    content:string;
    @Output()
    contentChange:EventEmitter<string> = new EventEmitter<string>();

    title = 'angular';
    public Editor = Editor;

    constructor (
    ) {
    }


    ngOnInit () {
    }

    contentChanged() {
        this.contentChange.emit(this.content);
    }
}